const app = getApp();
Page({
  data: {
    StatusBar: app.globalData.StatusBar,
    CustomBar: app.globalData.CustomBar,
    TabCur: 0,
    courseData: [
      {
        name: "寒假小班西安数学培训班（七大能力）",
        startTime: "一期下午15：30-17：00",
        timeSpan: "2020-01-16 至 2020-01-22",
        addr: "雁塔西路教学点",
        mode: "0",
        teacher: "李现",
        cost: "￥1151",
        teacherImg: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg"
      },
      {
        name: "寒假小班西安英文培训班（七大能力）",
        startTime: "一期下午15：30-17：00",
        timeSpan: "2020-01-16 至 2020-01-22",
        addr: "雁塔东路教学点",
        mode: "1",
        teacher: "杨幂",
        cost: "￥2151",
        teacherImg: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg"
      },
      {
        name: "寒假小班西安历史培训班（七大能力）",
        startTime: "一期下午15：30-17：00",
        timeSpan: "2020-01-16 至 2020-01-22",
        addr: "雁塔东路教学点",
        mode: "0",
        teacher: "杨颖",
        cost: "￥1351",
        teacherImg: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg"
      }
    ],
  },
  tabSelect(e) {
    this.setData({
      TabCur: e.currentTarget.dataset.id,
      scrollLeft: (e.currentTarget.dataset.id - 1) * 60
    })
  },
  courseInfo(e) {
    let course = e.currentTarget.dataset.course;
    console.log(course)
    wx.navigateTo({
      url: '/pages/course/details/details'
    })
  },
})